#include <stdio.h>
#include <signal.h>
#include <unistd.h>

void func(int,siginfo_t*,void*);

int main(int argc,char* argv[]){

  printf("my pid is %d\n",getpid());

  struct sigaction act;
  act.sa_sigaction = func;
  act.sa_flags = SA_SIGINFO;
  sigemptyset(&(act.sa_mask));

  sigaction(SIGINT,&act,NULL);
  pause();

  return 0;
}

void func(int num,siginfo_t* buf,void* data){
  printf("catch your is %d,%d\n",num,buf->si_int);
}
